package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;

public class Demo10 {
    public static void main(String[] args) {
        try (FileInputStream fileInputStream = new FileInputStream("d:text.txt")) {
            Scanner scanner = new Scanner(fileInputStream);
            System.out.println(scanner.next());
            System.out.println(scanner.nextLine());
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
